﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace LibraryMusicStore
{
    [MetadataType(typeof(AlbumMetaData))]
    public partial class Album
    {
        [Bind(Exclude = "AlbumId")]
        public class AlbumMetaData
        {
            [ScaffoldColumn(false)]
            public object AlbumId { get; set; }

            [DisplayName("Loại")]
            public object GenreId { get; set; }

            [DisplayName("Nghệ sĩ")]
            public object ArtistId { get; set; }

            [Required(ErrorMessage="Nhập tựa đề")]
            [DisplayName("Tựa đề")]
            [StringLength(160)]
            public object Title { get; set; }

            [DisplayName("Album Art Url")]
            [StringLength(1024)]
            public object AlbumArtUrl { get; set; }

            [Required(ErrorMessage = "Price is required")]
            [Range(1e-2, 1e2, 
                ErrorMessage="Price must be between {1} and {2}")]
            public object Price { get; set; }
        }
    }
}
